package com.bstek.demo.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.bstek.demo.dao.EmployeeDao;
import com.bstek.demo.entity.Employee;
import com.bstek.demo.entity.MyPage;
import com.bstek.demo.service.EmployeeService;
import com.bstek.demo.utils.CommonUtils;
import com.bstek.dorado.data.provider.Page;
/**
 * 员工信息实现类
 * @author lemon
 * 
 */
@Service
public class EmployeeServiceImpl implements EmployeeService {

	@Autowired EmployeeDao employeeDao;
	/**
	 * 获取员工信息 分页
	 */
	@Override
	public void getEmployee(Page<Employee> page) {
		QueryWrapper<Employee> qw = new QueryWrapper<>();
		MyPage<Employee> myPage = CommonUtils.getPageParams(page); 
		myPage = (MyPage<Employee>) employeeDao.selectPage(myPage, qw);
		page = CommonUtils.setPageParams(page, myPage);
	}

}
